// 订单状态（与后端OrderStatus完全对应）
export const OrderStatus = {
  PENDING: "pending",       // 待支付
  PAID: "paid",             // 已支付
  SHIPPED: "shipped",       // 已发货
  COMPLETED: "completed",   // 已完成
  CANCELLED: "cancelled"    // 已取消
};

// 支付渠道（与后端PaymentChannel对应）
export const PaymentChannel = {
  WECHAT: "wechat",
  ALIPAY: "alipay",
  UNIONPAY: "unionpay",
  BALANCE: "balance"
};

// 支付状态（与后端PaymentStatus对应）
export const PaymentStatus = {
  PENDING: "pending",       // 待支付
  PAID: "paid",             // 支付成功
  FAILED: "failed",         // 支付失败
  REFUNDING: "refunding",   // 退款中
  REFUNDED: "refunded",     // 已退款
  TIMEOUT: "timeout",       // 支付超时
  CANCELLED: "cancelled"    // 已取消
};

// 状态文本映射（用于页面显示）
export const OrderStatusText = {
  [OrderStatus.PENDING]: "待支付",
  [OrderStatus.PAID]: "已支付",
  [OrderStatus.SHIPPED]: "已发货",
  [OrderStatus.COMPLETED]: "已完成",
  [OrderStatus.CANCELLED]: "已取消"
};

export const PaymentChannelText = {
  [PaymentChannel.WECHAT]: "微信支付",
  [PaymentChannel.ALIPAY]: "支付宝支付",
  [PaymentChannel.UNIONPAY]: "银联支付",
  [PaymentChannel.BALANCE]: "余额支付"
};